<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的三种创建方式</title>
</head>
<body>
<script>
    /* 1. var obj = {} */
    var person = {
        uname: '张三',
        age: 18
    }

    /* 2. var obj = new Object() */
    var person2 = new Object()
    person2.uname = '李四'
    person2.age = 30

    /* 3. function Star() 构造函数 */
    function Star(uname, age) {
        this.uname = uname
        this.age = age
    }
    var person3 = new Star('王五', 28)

</script>
</body>
</html>